﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;

using System.Text;
using System.Windows.Forms;

namespace Itegracion.Framework.Forms
{
    public partial class ucEdicion : UserControl
    {
        public ucEdicion()
        {
            InitializeComponent();
        }

        protected Helper _(string assembly, string type, string method, params object[] controls)
        {
            return Helper.Instance.In(assembly, type, method, controls);
        }

        public void Clear() {
            foreach (Control control in Controls)
            {
                if (control is TextBox)
                    (control as TextBox).Clear();
                if (control is ComboBox)
                    (control as ComboBox).SelectedIndex = 0;
                if (control is DataGridView)
                    (control as DataGridView).DataSource = null;
            }
        }
    }
}
